<template>
	<view>
		<view class="m-t-50" v-if="orderList.length === 0">
			<u-empty></u-empty>
		</view>
		<view class="w-600 b_bai br-20 list-box m-t-30 m-l-25 m-r-25 p-l-50 p-r-50"
			v-for="(item,index) in orderList" :key="index" v-else @click="seeListDetail(item.id)">
			<view class="borderB">
				<view class="h-120 d_flex d_flex_between d_flex_items_center">
					<view class="d_flex d_flex_items_center">
						<text class="f-32 color333 f-wb">车辆：{{item.cartype}}</text>
						<text class="status m-l-15" v-if="item.status == 1 && item.product_confirm == 0">待确认</text>
						<text class="status m-l-15" v-else-if="item.status == 1">已确认</text>
						<text class="status m-l-15" v-else-if="item.status == 2">已完成</text>
						<text class="status m-l-15" v-else-if="item.status == 1 && item.product_confirm ==1">待评价</text>
						<text class="status m-l-15" v-else="item.status == 3">已取消</text>
					</view>
					<view class="f-wb f-32 color-ff7a1f">
						￥{{item.money}}
					</view>
				</view>
				<view class="color67 f-24 p-b-40">
					<u-icon name="clock" color="#2979ff" size="28"></u-icon>
					<text class="m-l-10">施工地点：{{item.workplace}}</text>
				</view>
				<view class="color67 f-24 p-b-40">
					<u-icon name="clock" color="#2979ff" size="28"></u-icon>
					<text class="m-l-10">工作时间：{{item.worktimestart}} 至 {{item.worktimeend}}</text>
				</view>
			</view>
			<view class="d_flex d_flex_around d_flex_items_center h-90 f-26 f-wb" v-show="item.status == 1 && item.product_confirm == 0">
				<view class="color-2979ff">自动确认时间至:{{item.auto_check_time}}</view>
			</view>
			<view class="d_flex d_flex_around d_flex_items_center h-90 f-32 f-wb" v-show="item.status == 1 && item.product_confirm != 0">
				<view class="color-2979ff" @click.stop="orderOk(item.id)">完成订单</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			orderList:Array
		},
		methods:{
			orderOk(id){
				this.$emit('orderOk',id)
			},
			seeListDetail(id){
				this.$emit('seeListDetail',id)
			}
		}
	}
</script>

<style lang="scss">
	.list-box{
		box-shadow: 0 0 10rpx #cecece;
		.status{
			background:#0055fe;
			color:#fff;
			font-size: 22rpx;
			width: 120rpx;
			border-radius: 10rpx;
			line-height:40rpx;
			text-align:center;
			display: inline-block;
		}
		.color-ff7a1f{
			color:#ff7a1f;
		}
		.color-2979ff{
			color:#2979ff;
		}
	}
</style>
